package chapter20;

public class Pig {
    String name;
    String color;
    double weight;

    public Pig(String name, String color, double weight) {
        this.name = name;
        this.color = color;
        this.weight = weight;
    }

    public Pig() {
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }

    public double getWeight() {
        return weight;
    }

    public void setWeight(double weight) {
        this.weight = weight;
    }

    @Override
    public String toString() {
        return "The pig's name:"+name+"color:"+color+"weight:"+weight;
    }
}